package com.observer;

import java.util.concurrent.Callable;

/**
 * @author: sun.hongliang
 * @create: 2019/10/18 12:18
 */
public class AccountTask implements Callable {
    private int numOne, numTwo;

    public AccountTask(int numOne, int numTwo) {
        this.numOne = numOne;
        this.numTwo = numTwo;
    }

    /**
     * 计算numOne和numTwo的值并相加
     */
    public Object call() throws Exception {
        int resultNum = this.numOne + this.numTwo;
        return String.valueOf(resultNum);
    }
}
